import request from '@/utils/request'

// 查询通用考核列表
export function listTraining(query) {
  return request({
    url: '/examine/training/list',
    method: 'get',
    params: query
  })
}

// 查询通用考核列表
export function listAll(query) {
  return request({
    url: '/examine/training/listAll',
    method: 'get',
    params: query
  })
}

// 查询考评列表
export function listEvaluate(query) {
  return request({
    url: '/examine/training/evaluateList',
    method: 'get',
    params: query
  })
}

// 查询考评审核列表
export function listEvaluateAppr(query) {
  return request({
    url: '/examine/training/evaluateApprList',
    method: 'get',
    params: query
  })
}

// 查询通用考核详细
export function getTraining(id) {
  return request({
    url: '/examine/training/' + id,
    method: 'get'
  })
}

// 新增通用考核
export function addTraining(data) {
  return request({
    url: '/examine/training',
    method: 'post',
    data: data
  })
}

// 修改通用考核
export function updateTraining(data) {
  return request({
    url: '/examine/training',
    method: 'put',
    data: data
  })
}

// 任务提交审核
export function submitApprove(data) {
  return request({
    url: '/examine/training/submitApprove',
    method: 'put',
    data: data
  })
}

// 任务考评提交
export function evaluateSubmit(data) {
  return request({
    url: '/examine/training/evaluateSubmit',
    method: 'put',
    data: data
  })
}

// 任务考评审核
export function evaluateApprove(data) {
  return request({
    url: '/examine/training/evaluateApprove',
    method: 'put',
    data: data
  })
}

// 删除通用考核
export function delTraining(id) {
  return request({
    url: '/examine/training/' + id,
    method: 'delete'
  })
}

// 统计接口
export function trainingStatistics(query) {
  return request({
    url: '/examine/training/statistics',
    method: 'get',
    params: query
  })
}

// 统计接口
export function trainingStatisticsDetail(query) {
  return request({
    url: '/examine/training/statistics/detail',
    method: 'get',
    params: query
  })
}
